<script setup>

import { ref, onMounted, reactive } from "vue"
import axios from "axios"

const planeTimeInfo = ref([]);


function getPlaneTime() {
    axios.get("http://localhost:8080/getPlaneTime")
        .then((res) => {
            planeTimeInfo.value = res.data.data.arr
            console.log(planeTimeInfo.value)
        })
}

onMounted(() => {
    getPlaneTime()
})



</script>

<template>
    <div class="tableInfo">

        <div>
            <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
                <el-tab-pane label="飞机时间表" name="first">
                    <div>
                        <el-table border :data="planeTimeInfo" style="width: 100%">
                            <el-table-column prop="ptid" label="序号" width="100" />
                            <el-table-column prop="planeId" label="飞机序号" width="100" />
                            <el-table-column prop="startTime" label="开始时间" width="300" />
                            <el-table-column prop="endTime" label="结束时间" width="300" />
                            <el-table-column prop="appointNum" label="预约数量" width="100" />
                            <el-table-column prop="status" label="工作状态" width="100" />
                            <el-table-column prop="deleted" label="飞机状态" width="100" />
                            <el-table-column label="操作">
                                <template #default="scope">
                                    <el-button type="primary" size="small">添加乘客</el-button>
                                    <el-button type="success" size="small">修改</el-button>
                                    <el-button type="danger" size="small">删除</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                    </div>
                </el-tab-pane>
                <el-tab-pane label="飞机表" name="second">Config</el-tab-pane>
                <el-tab-pane label="教练时间表" name="third">Role</el-tab-pane>
                <el-tab-pane label="教练表" name="fourth">Task</el-tab-pane>
            </el-tabs>
        </div>
    </div>
</template>

<style></style>